package com.xiu.travel.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum OrderTypeEnum implements IEnum<Integer>
{
    /**
     * 正常订单
     */
    REGULAR_ORDER(0,"正常订单"),
    /**
     * 秒杀订单
     */
    SECKILL_ORDER(1,"秒杀订单"),
    /**
     * 仓库订单
     */
    WAREHOUSE_ORDER(2,"仓库订单"),
    /**
     * 报损订单
     */
    BREAKAGE_ORDER(3,"报损订单"),
    /**
     * 盘库订单
     */
    CHECK_ORDER(4,"盘库订单");

    @EnumValue
    private final Integer code;
    @JsonValue
    private final String status;

    public String getStatus() {
        return status;
    }

    @Override
    public Integer getValue() {
        return code;
    }
}
